// NoEnoughPapersException.java
public class NoEnoughPapersException extends Exception {
    private final String studentName;
    private final int required;
    private final int available;

    public NoEnoughPapersException(String studentName, int required, int available) {
        super(String.format("学生%s希望选论文%d篇，但目前只有%d篇可选",
                studentName, required, available));
        this.studentName = studentName;
        this.required = required;
        this.available = available;
    }
}